#pragma once
#include <boost/asio.hpp>

class VtsRadarManagerWidget;
class SeaRadarManagerWidget;
class SimRadarMangerWidget;
class cat240radarmanagerwidget;
class yuanzhouradarwidget;
class Radar;

#include <QWidget>
#include "../SimRadar/SimRadarManager.h"

class RadarWidgetManager : public QObject
{
    Q_OBJECT
public:
    RadarWidgetManager(boost::asio::io_service &_io_service, QWidget *parent = nullptr);
    ~RadarWidgetManager();

    void AddRadar(int radar_type = UNKNOWN_RADAR_TYPE);
    void ShowWidget(int radar_type = UNKNOWN_RADAR_TYPE);
    void InitWidgets(int radar_type = UNKNOWN_RADAR_TYPE);

    void AddSimRadar(radar_param & param);
    static cat240radarmanagerwidget *cat240_radar_manager_widget_;
    static yuanzhouradarwidget *yuan_zhou_radar_widget;
public slots:
    void AddSimRadarSlot(radar_param & param);
    void SimRadarSetRadar(int);

private:
    void AddVtsRadar();
    void AddOwnRadar();
    void AddFileRadar();
    void AddSimRadarReal();
	void Addcat240Radar();
    void AddyuanzhouRadar();
    
Q_SIGNALS:
    void AddSimRadarSignal(radar_param & param);

public:


private:
    boost::asio::io_service &io_service_;

    VtsRadarManagerWidget *vts_radar_manager_widget_;
    SeaRadarManagerWidget *sea_radar_manager_widget_;
    SimRadarMangerWidget *sim_radar_manager_widget_;
	

    int radar_type_;

    QWidget *parent_;

    SimRadarManager simradar_manager_;
    std::shared_ptr<Radar> sim_radar_[2];
};